﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using MIMSModel.Abstract;

namespace MIMSDomain.Entities
{
    public class Patient
    {
        public int Id
        {
            get;
            set;
        }
        public string Code
        {
            get;
            set;
        }
        [Required]
        public string FirstName
        {
            set;
            get;
        }
        public string MiddleName
        {
            set;
            get;
        }
        public string LastName
        {
            get;
            set;
        }
        public PatientType PatientType
        {
            get;
            set;
        }
        public string Sex
        {
            get;
            set;
        }
        public string Phone
        {
            get;
            set;
        }
        public string Email
        {
            get;
            set;
        }
        public string Address
        {
            get;
            set;
        }
        public int? Age
        {
            get;
            set;
        }
        public DateTime DateOfBirth
        {
            get;
            set;
        }
        public virtual Occupation Occupation
        {
            get;
            set;
        }
        public virtual Religion Religion
        {
            get;
            set;
        }
        public virtual Tribe Tribe
        {
            get;
            set;
        }
        public virtual Genotype Genotype
        {
            get;
            set;
        }
        public virtual BloodGroup BloodGroup
        {
            get;
            set;
        }
        public bool HivStatus
        {
            get;
            set;
        }
        public IEnumerable<Allergy> Allergies
        {
            get;
            set;
        }
        public virtual NextOfKin NextOfKin
        {
            get;
            set;
        }
        public NextOfKinRelationType NextofKinRelationType
        {
            get;
            set;
        }

        public virtual ICollection<SurgicalHistory> SurgicalHistory { get; set; }
        public virtual ICollection<FamilyHistory> FamilyHistory { get; set; }
        public virtual ICollection<DrugHistory> DrugHistory { get; set; }
        public virtual ICollection<ObstetricHistory> ObstetricHistory { get; set; }
    }
    
    public enum PatientType : short
    {
        [Display(Name="Out Patient")]
        OutPatient,
        [Display(Name = "In Patient")]
        InPatient
    }
}
